/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package analex;

/**
 *
 * @author Pedrom
 */
public class FsmIdentifier {

    public FsmIdentifier() {
    }

    public boolean isIdentifier(String lexema) {
        if (Character.isLetter(lexema.charAt(0))) {
            for (int i = 0; i < lexema.length(); i++) {
                if (!Character.isLetter(lexema.charAt(i)) && !Character.isDigit(lexema.charAt(i)) && lexema.charAt(i) != '_') {
                    return false;
                }
            }
            return true;
        } else {
            return false;
        }
    }
}
